package com.game.model;

import com.game.global.CrashType;
import com.game.interfaces.CollisionAble;

import java.awt.*;

/**
 * @Author: tjc
 * @description
 * @Date Created in 3:43 2021-08-01
 */
public class Border extends Module implements CollisionAble {
    @Override
    public Rectangle getRec() {
        return new Rectangle(localX, localY, SIZE_X, SIZE_Y);
    }

    @Override
    public int getCollisionType() {
        return CrashType.BORDER;
    }

    @Override
    public int getLocalX() {
        return localX;
    }

    @Override
    public int getLocalY() {
        return localY;
    }

    public void setLocalY(int y) {
        this.localY = y;
    }

    public void setLocalX(int x) {
        this.localX = x;
    }

    public void setSIZE_X(int x) {
        SIZE_X = x;
    }

    public void setSIZE_Y(int y) {
       SIZE_Y = y;
    }

    @Override
    public int getRight() {
        return this.getLocalX() + this.SIZE_X;
    }

    @Override
    public int getBottom() {
        return this.getLocalY() + this.SIZE_Y;
    }

    @Override
    public void draw(Graphics g) {

    }
}
